package org.ecbox.android.sdk.request;

import org.ecbox.android.sdk.ApiRuleException;
import org.ecbox.android.sdk.EopHashMap;
import org.ecbox.android.sdk.EopRequest;
import org.ecbox.android.sdk.internal.mapping.ApiField;
import org.ecbox.android.sdk.response.UserGetResponse;

/**
 * 获取用户信息
 * 
 * File: UserGetRequest.java<br/>
 * Description: <br/>
 * 
 * Copyright: Copyright (c) 2014 ecbox.com<br/>
 * Company: ECBOX,Inc.<br/>
 * 
 * @author chenxiaochun
 * @date Oct 5, 2014
 * @version 1.0
 */
public class UserGetRequest extends EopRequest<UserGetResponse> {

  @ApiField
  private Long userId;

  @ApiField
  private String loginName;

  @Override
  public String getApiMethodName() {
    return "ecbox.user.get";
  }

  @Override
  public EopHashMap getTextParams() {
    EopHashMap params = new EopHashMap();
    params.put("userId", this.userId);
    params.put("loginName", this.loginName);
    return params;
  }

  @Override
  public Class<UserGetResponse> getResponseClass() {
    return UserGetResponse.class;
  }

  @Override
  public void check() throws ApiRuleException {
  }

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public String getLoginName() {
    return loginName;
  }

  public void setLoginName(String loginName) {
    this.loginName = loginName;
  }

}
